package com.silverbox.waimai.mapper;

import com.silverbox.waimai.entity.ReceiverAddress;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ReceiverAddressMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(ReceiverAddress record);

    int insertSelective(ReceiverAddress record);

    ReceiverAddress selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ReceiverAddress record);

    int updateByPrimaryKey(ReceiverAddress record);

    /*
     *<pre>
     * 说    明: 获取用户地址列表
     * 涉及版本:
     * 创 建 者: YangYangjun
     * 日    期: 2020-03-07 11:42
     *</pre>
     **/
    List<ReceiverAddress> findReceiverAddressList(@Param("buyerId") String buyerId);

    int countReceiverAddressList( @Param("buyerId") String buyerId);

    //清除其他默认地址
    void updateDefaultOthers(@Param("addressId") Integer addressId,@Param("thirdUserId")String thirdUserId);
}